home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Diamond Collection / The Diamond Collection (Software Vault)(Digital Impact).ISO / cdr44 / adsr13.zip / ACADD13.TXT next >
Text File  |  1995-02-01  |  2KB  |  59 lines

  1. Targeting AutoCAD for DOS R13 with Watcom C/C++ 10.x
  2.                               
  3. The following demonstrates how to create and debug an AutoCAD for Windows application with Watcom C/C++ version 10.x.  
  4.  
  5. This example uses the TOWER program included with AutoCAD for DOS release 13.
  6.  
  7. 1. Ensure the Environment is set up Properly
  8.  
  9. The Watcom and ADS environment variables should be set properly.  In addition to the Watcom environment, the following should be defined for AutoCAD for Windows:
  10.  
  11.   path=%path%;d:\acad
  12.   include=%include%;d:\acadr13\common\ads
  13.   set ACAD=d:\acadr13\common\support;d:\acadr13\dos;d:\acadr13\dos\support; d:\acadr13\common\fonts
  14.   set ACADCFG=d:\acadr13\dos
  15.   set ACADDRV=d:\acad\dos\drv
  16.  
  17.  NOTE: With earlier versions of Watcom the "DOSX" environment variable was required to be set to "-priv".  This should not be done with release 13.
  18.  
  19. 2. Create the Application
  20.  
  21. Create the application as follows:
  22. wcc386 winads  -d2 -s -j -fpi87 -fpr -3s -opmaxet
  23. wcc386 tower.c -d2 -s -j -fpi87 -fpr -3s -opmaxet
  24. wlink @TOWER.LNK
  25.    
  26. Where TOWER.LNK consists of the following:
  27. debug all 
  28. system ads 
  29. name tower 
  30. library wcads100.lib
  31. file tower 
  32. option map
  33.  
  34. 3. Setup the Debugger
  35.  
  36. If you are using 10.0 you will need to upgrade to the 'A' level patch in order to debug your application. You will require the ADSHELP.EXP contained in this zip file in order to debug AutoCad R13 for DOS applications.
  37.  
  38. Add the following to your ADSHELP.EXP file.
  39. d:\watcom\bin\adshelp.exp
  40.  
  41. 5. Running the Debugger
  42.  
  43. i) Start the Watcom Debugger as follows:
  44. wd /trap=ads /swap
  45.  
  46. ii) When the debugger prompts you for a filename to debug, either press ESC or select CANCEL.
  47.  
  48. iii) Select "Command" from the File menu and enter in the following:
  49. "ads c:\fullpath\tower.exp"
  50.     
  51. NOTE: It is recommeded that you enter in the full path to your application.
  52.  
  53. iv) AutoCAD will now start.  Type (xload "c:/fullpath/foo.exp") at the AutoCAD command prompt. 
  54.  
  55. NOTE:     It is recommended that you specify the full pathname to tower.exp.  Also note that the 
  56.     path uses the '/' character instead of the '\' as DOS does.  This is because AutoCAD
  57.     parses the single '\' out of the string.
  58.  
  59. v) You will now be in the debugger at the mainline of tower.exp. From here you can debug tower.exp.